//
//  PYImageSelection.m
//  PictureYourself
//
//  Created by Daniel on 9/7/12.
//
//

#import "PYImageSelection.h"

@implementation PYImageSelection

@synthesize cell_index;

-(id)init
{
    if((self = [super init]) == nil)
        return nil;
   
    image_selections_ =
        [[NSMutableArray arrayWithObjects:
            [NSNumber numberWithBool:FALSE],
            [NSNumber numberWithBool:FALSE],
            [NSNumber numberWithBool:FALSE],
            [NSNumber numberWithBool:FALSE],
            nil] retain];
    
    return self;
}

-(BOOL)objectIsSelectedAtIndex:(NSInteger)index
{
    NSNumber* number = [image_selections_ objectAtIndex:index];
    
    if(number == nil)
        return FALSE;
    
    return [number boolValue];
}

-(void)setSelectionForObjectAtIndex:(NSInteger)index :(BOOL)selected
{
    NSNumber* number = [NSNumber numberWithBool:selected];
    [image_selections_ replaceObjectAtIndex:index withObject:number];
}

@end
